package com.cloudlead.common.lang;

public enum CommonBusinessModules implements BusinessModule {
    api(null), persistence(null), async(null), security(null), scheduler(null), workflow(
            null), cache(null), sms(null), service(null);

    private final BusinessModule parent;

    private CommonBusinessModules(BusinessModule parent) {
        this.parent = parent;
    }

    @Override
    public String getName() {
        return this.name();
    }

    @Override
    public BusinessModule getParent() {
        return this.parent;
    }

    @Override
    public String getFullName() {
        return null == this.parent ? this.name() : this.parent.getFullName()
                + "-" + this.getName();
    }

    @Override
    public String getLabel() {
        return this.name();
    }

    @Override
    public int getOrdinal() {
        return this.ordinal();
    }
}
